﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bdcs.Core.Entity
{
    /// <summary>
    /// Base_DevArea数据模型对象
    /// </summary>
    [Serializable]
    public partial class Base_DevAreaMod
    {
        /// <summary>
        /// 初始化Base_DevArea数据模型对象
        /// </summary>
        public Base_DevAreaMod()
        {
            
        }
        /// <summary>
        /// 初始化Base_DevArea数据模型对象并给在SQL中不能为空的字段赋值
        /// </summary>
        /// <param name="id">id</param>
        /// <param name="deviceNo">DeviceNo</param>
        /// <param name="areaName">AreaName</param>
        /// <param name="longi">Longi</param>
        /// <param name="lati">Lati</param>
        /// <param name="radius">Radius</param>
        /// <param name="startTime">startTime</param>
        /// <param name="endTime">endTime</param>
        public Base_DevAreaMod(long id,string deviceNo,string areaName,decimal longi,decimal lati,int radius,string startTime,string endTime)
        {
            //给id字段赋值
            this.Id = id;
            //给DeviceNo字段赋值
            this.DeviceNo = deviceNo;
            //给AreaName字段赋值
            this.AreaName = areaName;
            //给Longi字段赋值
            this.Longi = longi;
            //给Lati字段赋值
            this.Lati = lati;
            //给Radius字段赋值
            this.Radius = radius;
            //给startTime字段赋值
            this.StartTime = startTime;
            //给endTime字段赋值
            this.EndTime = endTime;
        }
        /// <summary>
        /// 初始化Base_DevArea数据模型对象并给所有字段赋值
        /// </summary>
        /// <param name="id">id</param>
        /// <param name="deviceNo">DeviceNo</param>
        /// <param name="areaName">AreaName</param>
        /// <param name="longi">Longi</param>
        /// <param name="lati">Lati</param>
        /// <param name="radius">Radius</param>
        /// <param name="startTime">startTime</param>
        /// <param name="endTime">endTime</param>
        /// <param name="xwhere">xwhere</param>
        /// <param name="remark">Remark</param>
        public Base_DevAreaMod(long id,string deviceNo,string areaName,decimal longi,decimal lati,int radius,string startTime,string endTime,string xwhere,string remark)
        {
            //给id字段赋值
            this.Id = id;
            //给DeviceNo字段赋值
            this.DeviceNo = deviceNo;
            //给AreaName字段赋值
            this.AreaName = areaName;
            //给Longi字段赋值
            this.Longi = longi;
            //给Lati字段赋值
            this.Lati = lati;
            //给Radius字段赋值
            this.Radius = radius;
            //给startTime字段赋值
            this.StartTime = startTime;
            //给endTime字段赋值
            this.EndTime = endTime;
            //给xwhere字段赋值
            this.Xwhere = xwhere;
            //给Remark字段赋值
            this.Remark = remark;
        }
        
		//属性存储数据的变量
        private long _id;
        private string _deviceNo;
        private string _areaName;
        private decimal _longi;
        private decimal _lati;
        private int _radius;
        private string _startTime;
        private string _endTime;
        private string _xwhere;
        private string _remark;
        
        /// <summary>
        /// id
        /// </summary>
        public long Id
        {
            get { return this._id; }
            set { this._id = value; }
        }
        /// <summary>
        /// DeviceNo
        /// </summary>
        public string DeviceNo
        {
            get { return this._deviceNo; }
            set { this._deviceNo = value; }
        }
        /// <summary>
        /// AreaName
        /// </summary>
        public string AreaName
        {
            get { return this._areaName; }
            set { this._areaName = value; }
        }
        /// <summary>
        /// Longi
        /// </summary>
        public decimal Longi
        {
            get { return this._longi; }
            set { this._longi = value; }
        }
        /// <summary>
        /// Lati
        /// </summary>
        public decimal Lati
        {
            get { return this._lati; }
            set { this._lati = value; }
        }
        /// <summary>
        /// Radius
        /// </summary>
        public int Radius
        {
            get { return this._radius; }
            set { this._radius = value; }
        }
        /// <summary>
        /// startTime
        /// </summary>
        public string StartTime
        {
            get { return this._startTime; }
            set { this._startTime = value; }
        }
        /// <summary>
        /// endTime
        /// </summary>
        public string EndTime
        {
            get { return this._endTime; }
            set { this._endTime = value; }
        }
        /// <summary>
        /// xwhere
        /// </summary>
        public string Xwhere
        {
            get { return this._xwhere; }
            set { this._xwhere = value; }
        }
        /// <summary>
        /// Remark
        /// </summary>
        public string Remark
        {
            get { return this._remark; }
            set { this._remark = value; }
        }
        
        /// <summary>
        /// 对比两个Base_DevArea数据模型对象是否一致
        /// </summary>
        /// <param name="obj">要进行比对的Base_DevArea数据模型对象</param>
        /// <returns>返回是否一致，为true一致，为false不一致</returns>
        public override bool Equals(object obj)
        {
            //判断传入对象是否为null
            if (obj == null) return false;
            //将传入对象转换成Base_DevArea数据模型对象
            Base_DevAreaMod base_DevAreaMod = obj as Base_DevAreaMod;
            //判断是否转换成功
            if (base_DevAreaMod == null) return false;
            //进行匹配属性的值
            return
                //判断id是否一致
                this.Id == base_DevAreaMod.Id &&
                //判断DeviceNo是否一致
                this.DeviceNo == base_DevAreaMod.DeviceNo &&
                //判断AreaName是否一致
                this.AreaName == base_DevAreaMod.AreaName &&
                //判断Longi是否一致
                this.Longi == base_DevAreaMod.Longi &&
                //判断Lati是否一致
                this.Lati == base_DevAreaMod.Lati &&
                //判断Radius是否一致
                this.Radius == base_DevAreaMod.Radius &&
                //判断startTime是否一致
                this.StartTime == base_DevAreaMod.StartTime &&
                //判断endTime是否一致
                this.EndTime == base_DevAreaMod.EndTime &&
                //判断xwhere是否一致
                this.Xwhere == base_DevAreaMod.Xwhere &&
                //判断Remark是否一致
                this.Remark == base_DevAreaMod.Remark;
        }
        /// <summary>
        /// 将当前Base_DevArea数据模型对象转换成哈希码
        /// </summary>
        /// <returns>哈希值</returns>
        public override int GetHashCode()
        {
            //将Base_DevArea数据模型对象的属性进行按位异或运算处理得到哈希码并返回
            return
                //将id进行按位异或运算处理
                this.Id.GetHashCode() ^
                //将DeviceNo进行按位异或运算处理
                (this.DeviceNo == null ? 2147483647 : this.DeviceNo.GetHashCode()) ^
                //将AreaName进行按位异或运算处理
                (this.AreaName == null ? 2147483647 : this.AreaName.GetHashCode()) ^
                //将Longi进行按位异或运算处理
                this.Longi.GetHashCode() ^
                //将Lati进行按位异或运算处理
                this.Lati.GetHashCode() ^
                //将Radius进行按位异或运算处理
                this.Radius.GetHashCode() ^
                //将startTime进行按位异或运算处理
                (this.StartTime == null ? 2147483647 : this.StartTime.GetHashCode()) ^
                //将endTime进行按位异或运算处理
                (this.EndTime == null ? 2147483647 : this.EndTime.GetHashCode()) ^
                //将xwhere进行按位异或运算处理
                (this.Xwhere == null ? 2147483647 : this.Xwhere.GetHashCode()) ^
                //将Remark进行按位异或运算处理
                (this.Remark == null ? 2147483647 : this.Remark.GetHashCode());
        }
        /// <summary>
        /// 将当前Base_DevArea数据模型对象转换成字符串副本【仅显示在SQL中不能为空的列】
        /// </summary>
        /// <returns>字符串形式副本</returns>
        public override string ToString()
        {
            //将当前Base_DevArea数据模型对象转换成字符串副本
            return
                "[" +
                //将id转换成字符串
                this.Id + "," +
                //将DeviceNo转换成字符串
                this.DeviceNo + "," +
                //将AreaName转换成字符串
                this.AreaName + "," +
                //将Longi转换成字符串
                this.Longi + "," +
                //将Lati转换成字符串
                this.Lati + "," +
                //将Radius转换成字符串
                this.Radius + "," +
                //将startTime转换成字符串
                this.StartTime + "," +
                //将endTime转换成字符串
                this.EndTime +
                "]";
        }
    }
}
